﻿using Common.Device.Enums;
using Prism.Mvvm;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media;

namespace Common.Device.ViewModels
{
    public class CeLiangYiViewModel:BindableBase
    {
        private int menuIndex = 0;
        /// <summary>
        /// 菜单索引
        /// </summary>
        public int MenuIndex
        {
            get { return menuIndex; }
            set { SetProperty(ref menuIndex, value); }
        }
        private bool hasVol = false;
        /// <summary>
        /// 是否支持电压采集
        /// </summary>
        public bool HasVol
        {
            get { return hasVol; }
            set { SetProperty(ref hasVol, value); }
        }
        private bool hasCur = false;
        /// <summary>
        /// 是否支持电流采集
        /// </summary>
        public bool HasCur
        {
            get { return hasCur; }
            set { SetProperty(ref hasCur, value); }
        }
        private bool hasR = false;
        /// <summary>
        /// 是否支持电阻采集
        /// </summary>
        public bool HasR
        {
            get { return hasR; }
            set { SetProperty(ref hasR, value); }
        }
        private bool hasDuanLu = false;
        /// <summary>
        /// 是否支持短路测试
        /// </summary>
        public bool HasDuanLu
        {
            get { return hasDuanLu; }
            set { SetProperty(ref hasDuanLu, value); }
        }
        private bool hasErJiGuan = false;
        /// <summary>
        /// 是否支持二极管测试
        /// </summary>
        public bool HasErJiGuan
        {
            get { return hasErJiGuan; }
            set { SetProperty(ref hasErJiGuan, value); }
        }
        private bool hasDianRong = false;
        /// <summary>
        /// 是否支持电容测试
        /// </summary>
        public bool HasDianRong
        {
            get { return hasDianRong; }
            set { SetProperty(ref hasDianRong, value); }
        }
        private bool hasDianGan = false;
        /// <summary>
        /// 是否支持电感测试
        /// </summary>
        public bool HasDianGan
        {
            get { return hasDianGan; }
            set { SetProperty(ref hasDianGan, value); }
        }
        private ObservableCollection<int> volChannels = new ObservableCollection<int>() { 1 };
        /// <summary>
        /// 电压采集通道
        /// </summary>
        public ObservableCollection<int> VolChannels
        {
            get { return volChannels; }
            set { SetProperty(ref volChannels, value); }
        }
        private int volChannel = 1;
        /// <summary>
        /// 电压采集通道
        /// </summary>
        public int VolChannel
        {
            get { return volChannel; }
            set { SetProperty(ref volChannel, value); }
        }
        private List<string> volTemps = Enum.GetNames(typeof(CeLiangYiEnum.VoltageMode)).ToList();
        /// <summary>
        /// 电压采集方式
        /// </summary>
        public List<string> VolTemps
        {
            get { return volTemps; }
            set { SetProperty(ref volTemps, value); }
        }
        private string volTemp = CeLiangYiEnum.VoltageMode.DC.ToString();
        /// <summary>
        /// 电压采集方式
        /// </summary>
        public string VolTemp
        {
            get { return volTemp; }
            set { SetProperty(ref volTemp, value); }
        }
        private string volMin;
        /// <summary>
        /// 电压下限
        /// </summary>
        public string VolMin
        {
            get { return volMin; }
            set { SetProperty(ref volMin, value); }
        }
        private string volMax;
        /// <summary>
        /// 电压上限
        /// </summary>
        public string VolMax
        {
            get { return volMax; }
            set { SetProperty(ref volMax, value); }
        }
        private ObservableCollection<int> curChannels = new ObservableCollection<int>() { 1 };
        /// <summary>
        /// 电流采集通道
        /// </summary>
        public ObservableCollection<int> CurChannels
        {
            get { return curChannels; }
            set { SetProperty(ref curChannels, value); }
        }
        private int curChannel = 1;
        /// <summary>
        /// 电压采集通道
        /// </summary>
        public int CurChannel
        {
            get { return curChannel; }
            set { SetProperty(ref curChannel, value); }
        }
        private List<string> curTemps = Enum.GetNames(typeof(CeLiangYiEnum.CurrentMode)).ToList();
        /// <summary>
        /// 电流采集方式
        /// </summary>
        public List<string> CurTemps
        {
            get { return curTemps; }
            set { SetProperty(ref curTemps, value);  }
        }
        private string curTemp = CeLiangYiEnum.CurrentMode.DC.ToString();
        /// <summary>
        /// 电流采集方式
        /// </summary>
        public string CurTemp
        {
            get { return curTemp; }
            set { SetProperty(ref curTemp, value); }
        }
        private string curMin;
        /// <summary>
        /// 电流下限
        /// </summary>
        public string CurMin
        {
            get { return curMin; }
            set { SetProperty(ref curMin, value); }
        }
        private string curMax;
        /// <summary>
        /// 电流上限
        /// </summary>
        public string CurMax
        {
            get { return curMax; }
            set { SetProperty(ref curMax, value); }
        }
        private ObservableCollection<int> rChannels = new ObservableCollection<int>() { 1 };
        /// <summary>
        /// 电阻采集通道
        /// </summary>
        public ObservableCollection<int> RChannels
        {
            get { return rChannels; }
            set { SetProperty(ref rChannels, value); }
        }
        private int rChannel = 1;
        /// <summary>
        /// 电阻采集通道
        /// </summary>
        public int RChannel
        {
            get { return rChannel; }
            set { SetProperty(ref rChannel, value); }
        }
        private List<string> rTemps = Enum.GetNames(typeof(CeLiangYiEnum.ResistanceMode)).ToList();
        /// <summary>
        /// 电阻采集方式
        /// </summary>
        public List<string> RTemps
        {
            get { return rTemps; }
            set { SetProperty(ref rTemps, value); }
        }
        private string rTemp = CeLiangYiEnum.ResistanceMode._2WR.ToString();
        /// <summary>
        /// 电阻采集方式
        /// </summary>
        public string RTemp
        {
            get { return rTemp; }
            set { SetProperty(ref rTemp, value); }
        }
        private string rMin;
        /// <summary>
        /// 电阻下限
        /// </summary>
        public string RMin
        {
            get { return rMin; }
            set { SetProperty(ref rMin, value); }
        }
        private string rMax;
        /// <summary>
        /// 电阻上限
        /// </summary>
        public string RMax
        {
            get { return rMax; }
            set { SetProperty(ref rMax, value); }
        }
        private ObservableCollection<int> duanLuChannels = new ObservableCollection<int>() { 1 };
        /// <summary>
        /// 短路测试通道
        /// </summary>
        public ObservableCollection<int> DuanLuChannels
        {
            get { return duanLuChannels; }
            set { SetProperty(ref duanLuChannels, value); }
        }
        private int duanLuChannel = 1;
        /// <summary>
        /// 短路测试通道
        /// </summary>
        public int DuanLuChannel
        {
            get { return duanLuChannel; }
            set { SetProperty(ref duanLuChannel, value); }
        }
        private string duanLuMin;
        /// <summary>
        /// 短路测试电阻下限
        /// </summary>
        public string DuanLuMin
        {
            get { return duanLuMin; }
            set { SetProperty(ref duanLuMin, value); }
        }
        private string duanLuMax;
        /// <summary>
        /// 短路测试电阻上限
        /// </summary>
        public string DuanLuMax
        {
            get { return duanLuMax; }
            set { SetProperty(ref duanLuMax, value); }
        }
        private ObservableCollection<int> erJiGuanChannels = new ObservableCollection<int>() { 1 };
        /// <summary>
        /// 二极管测试通道
        /// </summary>
        public ObservableCollection<int> ErJiGuanChannels
        {
            get { return erJiGuanChannels; }
            set { SetProperty(ref erJiGuanChannels, value); }
        }
        private int erJiGuanChannel = 1;
        /// <summary>
        /// 二极管测试通道
        /// </summary>
        public int ErJiGuanChannel
        {
            get { return erJiGuanChannel; }
            set { SetProperty(ref erJiGuanChannel, value); }
        }
        private string erJiGuanMin;
        /// <summary>
        /// 二极管测试电阻下限
        /// </summary>
        public string ErJiGuanMin
        {
            get { return erJiGuanMin; }
            set { SetProperty(ref erJiGuanMin, value); }
        }
        private string erJiGuanMax;
        /// <summary>
        /// 二极管测试电阻上限
        /// </summary>
        public string ErJiGuanMax
        {
            get { return erJiGuanMax; }
            set { SetProperty(ref erJiGuanMax, value); }
        }
        private ObservableCollection<int> dianRongChannels = new ObservableCollection<int>() { 1 };
        /// <summary>
        /// 电容采集通道
        /// </summary>
        public ObservableCollection<int> DianRongChannels
        {
            get { return dianRongChannels; }
            set { SetProperty(ref dianRongChannels, value); }
        }
        private int dianRongChannel = 1;
        /// <summary>
        /// 电容采集通道
        /// </summary>
        public int DianRongChannel
        {
            get { return dianRongChannel; }
            set { SetProperty(ref dianRongChannel, value); }
        }
        private List<string> dianRongTemps = Enum.GetNames(typeof(CeLiangYiEnum.DianRongMode)).ToList();
        /// <summary>
        /// 电容采集方式
        /// </summary>
        public List<string> DianRongTemps
        {
            get { return dianRongTemps; }
            set { SetProperty(ref dianRongTemps, value); }
        }
        private string dianRongTemp = CeLiangYiEnum.DianRongMode.CPD.ToString();
        /// <summary>
        /// 电容采集方式
        /// </summary>
        public string DianRongTemp
        {
            get { return dianRongTemp; }
            set { SetProperty(ref dianRongTemp, value); }
        }
        private string dianRongVol;
        /// <summary>
        /// 电容采集电压
        /// </summary>
        public string DianRongVol
        {
            get { return dianRongVol; }
            set { SetProperty(ref dianRongVol, value); }
        }
        private string dianRongMin;
        /// <summary>
        /// 电容采集下限
        /// </summary>
        public string DianRongMin
        {
            get { return dianRongMin; }
            set { SetProperty(ref dianRongMin, value); }
        }
        private string dianRongMax;
        /// <summary>
        /// 电容采集上限
        /// </summary>
        public string DianRongMax
        {
            get { return dianRongMax; }
            set { SetProperty(ref dianRongMax, value); }
        }
        private ObservableCollection<int> dianGanChannels = new ObservableCollection<int>() { 1 };
        /// <summary>
        /// 电感采集通道
        /// </summary>
        public ObservableCollection<int> DianGanChannels
        {
            get { return dianGanChannels; }
            set { SetProperty(ref dianGanChannels, value); }
        }
        private int dianGanChannel = 1;
        /// <summary>
        /// 电感采集通道
        /// </summary>
        public int DianGanChannel
        {
            get { return dianGanChannel; }
            set { SetProperty(ref dianGanChannel, value); }
        }
        private List<string> dianGanTemps = Enum.GetNames(typeof(CeLiangYiEnum.DianGanMode)).ToList();
        /// <summary>
        /// 电感采集方式
        /// </summary>
        public List<string> DianGanTemps
        {
            get { return dianGanTemps; }
            set { SetProperty(ref dianGanTemps, value); }
        }
        private string dianGanTemp = CeLiangYiEnum.DianGanMode.LPD.ToString();
        /// <summary>
        /// 电感采集方式
        /// </summary>
        public string DianGanTemp
        {
            get { return dianGanTemp; }
            set { SetProperty(ref dianGanTemp, value); }
        }
        private string dianGanVol;
        /// <summary>
        /// 电感采集电压
        /// </summary>
        public string DianGanVol
        {
            get { return dianGanVol; }
            set { SetProperty(ref dianGanVol, value); }
        }
        private string dianGanMin;
        /// <summary>
        /// 电感采集下限
        /// </summary>
        public string DianGanMin
        {
            get { return dianGanMin; }
            set { SetProperty(ref dianGanMin, value); }
        }
        private string dianGanMax;
        /// <summary>
        /// 电感采集上限
        /// </summary>
        public string DianGanMax
        {
            get { return dianGanMax; }
            set { SetProperty(ref dianGanMax, value); }
        }
    }
}
